package ws.utils

import org.junit.*

/**
 * Test case for the ArrayUtil class.
 * 
 * @author Wilson Santos, 36228 <wilson.santos@ua.pt>
 */
class ArrayUtilTest extends GroovyTestCase {
  @Before
  void setUp() {
    println "------------------------------------------------------------------"
  }

  @Test
	public void testGenRandomByteArray() {
    println "testGenRandomByteArray()"
    0.upto(40){
      println "n = $it"
      assertEquals it, ArrayUtil.genRandomByteArray(it).length
    }
  }

  @Test
	public void testPrintHex() {
    println "testPrintHex()"
    0.upto(40){
      println "n = $it"
      ArrayUtil.printHex(ArrayUtil.genRandomByteArray(it))
      println "\n\n"
    }
  }
}

